<template>
	<view class="bgMinor2 pt-24 plr-24 pt-40 pb-40" :style="{ minHeight: `${windowHeight}px`, height: 'auto' }">

		<!-- 我的页面 进入 -->
		<z-paging ref="refPaging" v-if="dataInfo.flag === 'veinMan1' || dataInfo.flag === 'veinMan2'">

			<view class="" style="margin: 30rpx 30rpx;border-radius: 16rpx 16rpx 0rpx 0rpx;box-sizing: border-box;
		box-shadow: 0 0 8px #cecece;">
				<view class="bgMinor5 radius-16" style="width: 100%;height: 800rpx;">

					<view class="Flex " style="width: 394x;height: 800rpx;">

						<img :src=" dataInfo.imgUrl" style="width:100% !important;height:800rpx !important;"
							mode="aspectFit"></img>

					</view>

					<view class="bgWhite plr-24 pb-40"
						style="min-height: 200rpx; border-radius:0rpx 0rpx 16rpx 16rpx; box-shadow: 0px 0px 0px 0px #cecece;">
						<view class="flex1 ptb-24 border-b-2">
							<view class="">

								<uv-avatar :src="dataInfo.avatar" shape="circle" size="100rpx"></uv-avatar>
							</view>
							<view class="ml-20 flex-1">
								<view class="flex">
									<view class="flex1">
										<view class="size-34 bold">{{dataInfo.realname}}</view>
										<view class="ml-24" style="visibility: hidden !important">
											<uv-image src="/static/images/vip2.png" width="44rpx" height="44rpx"
												mode="scaleToFill"></uv-image>
											<!-- <uv-image src="/static/images/vip1.png" width="44rpx" height="44rpx" mode="scaleToFill"></uv-image> -->
										</view>
									</view>
									<!-- <view class="flex flex-bottom lineHeight1">
									<view class="size-20">￥</view>
									<view class="numClass">30</view>
								</view> -->
								</view>
								<view class="flex mt-18">
									<view class="flex1">
										<view class="flex1">
											<!-- "isCollect":"0:未收藏 1：已收藏", -->
											<!-- <uv-image src="/static/images/xihuan.png" width="30rpx" height="30rpx" mode="scaleToFill"></uv-image> -->
											<uv-image @click="kongAiFun(1)" v-if="!dataInfo.kongAi  "
												src="/static/images/KongAi.png" width="30rpx" height="30rpx"
												mode="scaleToFill"></uv-image>
											<uv-image @click="kongAiFun(1)" v-else src="/static/images/Hai.png"
												width="30rpx" height="30rpx" mode="scaleToFill"></uv-image>
											<view class="ml-10 color-black2 size-19">{{ dataInfo.dzNum  }}</view>
										</view>
										<view class="flex1 ml-40">
											<!-- <uv-image src="/static/images/shoucang.png" width="30rpx" height="30rpx" mode="scaleToFill"></uv-image> -->
											<uv-image @click="kongAiFun(0)" v-if="!dataInfo.shouAi"
												src="/static/images/wk.png" width="30rpx" height="30rpx"
												mode="scaleToFill"></uv-image>
											<uv-image @click="kongAiFun(0)" v-else src="/static/images/ws.png"
												width="30rpx" height="30rpx" mode="scaleToFill"></uv-image>
											<view class="ml-10 color-black2 size-19">{{ dataInfo.scNum  }}</view>
										</view>
									</view>
									<view @click="delFun" style="20rpx">
										<uv-image src="/static/images/delete.png" width="100rpx" height="46rpx"
											mode="scaleToFill"></uv-image>
									</view>
									<view v-if="dataInfo.flag === 'hot1'" class="btnUseClass"
										@click="addOpen(`/pages/homepage/customization?id=` + dataInfo.id )">使用同款</view>
									<view v-else-if="dataInfo.flag === 'hot2'"
										@click="addOpen(`/pages/homepage/customization?id=` + dataInfo.id )"
										class="btnUseClass btnUseClass2">使用同款</view>
								</view>
							</view>
						</view>

						<!-- <view class="ptb-24 flex1 size-24 color-black2">
						<view class="">
							关键词：
						</view>
						<view class="flex-1">
							七分身、时尚摄影、极简主义
						</view>
					</view> -->
						<view class="pt-20 pb-30 flex1 size-24 color-black2" style="min-height: 250rpx;">
							<view class="">用户需知：</view>
							<view class="flex-1">
								发布模型到“广场-脉星人”板块，可供商家选择；商家使用该模型并下载所生成的图片，按每张计费，供商家商用，同时给您创造收益。（均为正规商家）
							</view>

						</view>



					</view>
				</view>
			</view>
			<template #bottom>

				<view class="pd-24 bgMinor2" style="margin-bottom: 50rpx;">
					<view class="list_b_btn" v-if=" dataInfo.state  == 0" @click="isFaBuFun(0)">发 布</view>
					<view class="list_b_btn list_b_btn2" v-else @click="isFaBuFun('1')">取消发布</view>
				</view>
				<!-- <view class="mt-30"  > -->
				<!-- "state":0 # 0:末发布 1:已发布， -->
				<!-- </view> -->
			</template>
		</z-paging>
		<!-- class="shadowClass" -->
		<!-- 广场 进入 热门 -->
		<view v-else-if="dataInfo.flag === 'hot1' ||dataInfo.flag === 'hot3' || dataInfo.flag === 'hot2'" style="border-radius: 16rpx;box-sizing: border-box;
		box-shadow: 0 0 8px #cecece;">



			<view class="bgMinor5 radius-16">

				<view class="Flex " style="width: 394x;height: 800rpx;">
					<!-- 在模型生成好时，界面换成“发布”详情界面 -->

					<!-- <view class="size-30 color-black3 ml-10">请耐心等候</view> -->
					<!-- <uv-image :src="dataInfo.imgUrl" height="800rpx" mode="heightFix"></uv-image> -->

					<img :src=" dataInfo.imgUrl" style="width:100% !important;height:800rpx !important;"
						mode="aspectFit"></img>


				</view>
				<view class="bgWhite plr-24 pb-40">
					<view class="flex1 ptb-24 border-b-2">
						<view class="">

							<uv-avatar :src="dataInfo.avatar" shape="circle" size="100rpx"></uv-avatar>

						</view>
						<view>
							<view class="ml-20 flex-1">
								<view class="flex" style="display: flex;width: 500rpx;justify-content: space-between;">
									<view class="flex1"  >
										<view class="size-34 bold">{{dataInfo.realname}}</view>
										<view class="ml-24"  v-show="dataInfo.flag === 'hot3'" >
											
											<uv-image @click="addOpen(`/pages/homepage/rehandling`)"
											v-if='dataInfo.isMember != 1'
												src="/static/images/vip1.png" width="44rpx" height="44rpx"
												mode="scaleToFill"></uv-image>
											<uv-image @click="addOpen('/pages/homepage/rehandling')"
											v-else
												src="/static/images/vip2.png" width="44rpx" height="44rpx"
												mode="scaleToFill"></uv-image>
										</view>

										<!-- <uv-image src="/static/images/vip1.png" width="44rpx" height="44rpx" mode="scaleToFill"></uv-image> -->
									</view>
									<view v-show="dataInfo.flag === 'hot3'">
										¥ {{dataInfo.price}} 
									</view>
								</view>
								<!-- <view class="flex flex-bottom lineHeight1">									<view class="size-20">￥</view>
									<view class="numClass">30</view>
								</view> -->

							</view>

							<view class="flex mt-18">
								<view class="flex1">
									<view class="flex1">
										<!-- <uv-image src="/static/images/xihuan.png" width="30rpx" height="30rpx" mode="scaleToFill"></uv-image> -->
										<!-- 	<uv-image @click="kongAiFun(1)" v-if="dataInfo.kongAi"
											src="/static/images/kongAi.png" width="30rpx" height="30rpx"
											mode="scaleToFill"></uv-image>
										<uv-image @click="kongAiFun(1)" v-else src="/static/images/Hai.png"
											width="30rpx" height="30rpx" mode="scaleToFill"></uv-image> -->
										<uv-image @click="kongAiFun(1)" v-if=" !dataInfo.isLike  || !dataInfo.kongAi"
											src="/static/images/KongAi.png" width="30rpx" height="30rpx"
											mode="scaleToFill"></uv-image>
										<uv-image @click="kongAiFun(1)" v-else src="/static/images/Hai.png"
											width="30rpx" height="30rpx" mode="scaleToFill"></uv-image>
										<view class="ml-10 color-black2 size-19">{{ dataInfo.dzNum  }}</view>
									</view>
									<view class="flex1 ml-40">
										<!-- <uv-image src="/static/images/shoucang.png" width="30rpx" height="30rpx" mode="scaleToFill"></uv-image> -->
										<uv-image @click="kongAiFun(0)" v-if=" !dataInfo.isCollect  ||!dataInfo.shouAi"
											src="/static/images/wk.png" width="30rpx" height="30rpx"
											mode="scaleToFill"></uv-image>
										<uv-image @click="kongAiFun(0)" v-else src="/static/images/ws.png" width="30rpx"
											height="30rpx" mode="scaleToFill"></uv-image>
										<view class="ml-10 color-black2 size-19">{{ dataInfo.scNum  }}</view>
									</view>
								</view>
                                 
								<view v-if="dataInfo.flag === 'hot1'" class="btnUseClass"
									@click="addOpen(`/pages/homepage/customization?id=` + dataInfo.id )">
									{{'使用同款'}}</view>
								<view v-if="dataInfo.flag === 'hot3'" class="btnUseClass"
									@click="addOpen(`/pages/homepage/rehandling?tab=1&current=1&id=` + dataInfo.id )">
									{{dataInfo.flag === 'hot3'? '免费试用':'使用同款'}}</view>


								<view v-else-if="dataInfo.flag === 'hot2'"
									@click="addOpen(`/pages/homepage/customization?id=` + dataInfo.id )"
									class="btnUseClass btnUseClass2"> {{'使用同款'}}</view>
							</view>
						</view>
					</view>
					<view class="ptb-24 flex1 size-24 color-black2" style="color: rgb(128,128,128);min-height:270rpx ;">
						<view class="">
							关键词：
						</view>
						<view class="flex-1">
							{{dataInfo.characters}}
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- class="shadowClass" -->
		<!-- 广场 进入 脉星人 -->
		<view v-else-if="dataInfo.flag === 'tryOut1' || dataInfo.flag === 'tryOut2'" style="margin: 30rpx 30rpx;border-radius: 16rpx;box-sizing: border-box;
		box-shadow: 0 0 8px #cecece;">

			<view class="bgMinor5 radius-16">

				<view class="Flex " style="width: 394x;height: 800rpx;">
					<!-- 在模型生成好时，界面换成“发布”详情界面 -->

					<!-- <view class="size-30 color-black3 ml-10">请耐心等候</view> -->
					<!-- <uv-image :src="dataInfo.imgUrl" height="800rpx" mode="heightFix"></uv-image> -->

					<img :src=" dataInfo.imgUrl" style="width:100% !important;height:800rpx !important;"
						mode="aspectFit"></img>

				</view>
				<view class="bgWhite plr-24 pb-40">
					<view class="flex1 ptb-24 border-b-2">
						<view class="">
							<uv-avatar :src="dataInfo.avatar" shape="circle" size="100rpx"></uv-avatar>
						</view>
						<view class="ml-20 flex-1">
							<view class="flex">
								<view class="flex1">
									<view class="size-34 bold">{{dataInfo.realname}}</view>
									<view class="ml-24">
										<uv-image src="/static/images/vip2.png" width="44rpx" height="44rpx"
											style="visibility: hidden;" mode="scaleToFill"></uv-image>
										<!-- <uv-image src="/static/images/vip1.png" width="44rpx" height="44rpx" mode="scaleToFill"></uv-image> -->
									</view>
								</view>
								<view class="flex flex-bottom lineHeight1">
									<view class="size-20">￥</view>
									<view class="numClass">30</view>
								</view>
							</view>
							<view class="flex mt-18">
								<view class="flex1">
									<!-- <uv-image src="/static/images/xihuan.png" width="30rpx" height="30rpx" mode="scaleToFill"></uv-image> -->
									<uv-image @click="kongAiFun(1)" v-if=" dataInfo.kongAi"
										src="/static/images/KongAi.png" width="30rpx" height="30rpx"
										mode="scaleToFill"></uv-image>
									<uv-image @click="kongAiFun(1)" v-else src="/static/images/Hai.png" width="30rpx"
										height="30rpx" mode="scaleToFill"></uv-image>
									<view class="ml-10 color-black2 size-19">{{ dataInfo.dzNum  }}</view>
								</view>
								<view class="flex1 ml-40">
									<!-- <uv-image src="/static/images/shoucang.png" width="30rpx" height="30rpx" mode="scaleToFill"></uv-image> -->
									<uv-image @click="kongAiFun(0)" v-if=" dataInfo.shouAi" src="/static/images/wk.png"
										width="30rpx" height="30rpx" mode="scaleToFill"></uv-image>
									<uv-image @click="kongAiFun(0)" v-else src="/static/images/ws.png" width="30rpx"
										height="30rpx" mode="scaleToFill"></uv-image>
									<view class="ml-10 color-black2 size-19">{{ dataInfo.scNum  }}</view>
								</view>
								<view v-if="dataInfo.flag === 'tryOut1'" class="btnUseClass">免费试用</view>
								<view v-else-if="dataInfo.flag === 'tryOut2'" class="btnUseClass btnUseClass2">免费试用
								</view>
							</view>
						</view>
					</view>
					<view class="ptb-24 flex1 size-24 color-black2" style="color: rgb(128,128,128);min-height: 270rpx;">
						<view class="">
							关键词：
						</view>
						<view class="flex-1">
							{{dataInfo.characters}}
						</view>
					</view>
				</view>
			</view>
		</view>


		<!-- 	<view v-else>

			<view class="shadowClass">
				<view class="bgMinor5 radius-16">
					<view class="Flex height-800">
						<view class="size-30 color-black3 ml-10">请耐心等候</view>
					</view>
					<view class="bgWhite plr-24">
						<view class="Flex ptb-24 border-b-2">
							<view class="">
								<uv-avatar src="https://via.placeholder.com/200x200.png/2878ff" shape="circle"
									size="100rpx"></uv-avatar>
							</view>
							<view class="ml-20 size-34 bold">{{dataInfo.realname}}</view>
							<view class="ml-24">
								<uv-image src="/static/images/vip2.png" width="44rpx" height="44rpx"
									style="visibility: hidden;" mode="scaleToFill"></uv-image>
								<uv-image src="/static/images/vip1.png" width="44rpx" height="44rpx" mode="scaleToFill"></uv-image>
							</view>
						</view>
						<view class="ptb-24 flex1 size-24 color-black2">
							<view class="">用户需知：</view>
							<view class="flex-1">
								发布模型到“广场-脉星人”板块，可供商家选择；商家使用该模型并下载所生成的图片，按每张计费，供商家商用，同时给您创造收益。（均为正规商家）
							</view>

						</view>

					</view>
				</view>
			</view>
			<view class="">
				<view class="width100 height-90"></view>
				<view class="fixedClass plr-24">
					<view class="list_b_btn">正在生成中…</view>
				</view>
			</view>
		</view> -->
		<uv-popup ref="popupUseRef" mode="center" style="z-index: 9999;" round="16rpx">
			<view class="relative ptb-40 mlr-40" id="release_warp">
				<view class="closeClass" @click="close_release">
					<uv-icon name="close-circle" color="#E1E1E1" size="28"></uv-icon>
				</view>
				<view class="mt-40">
					<view class="bgWhite">
						<view class="">
							<view class="Flex">
							<image
								:key="timer"
								class="release_img"
								:style="{ width: imageStyle.width, height: imageStyle.height }"
								:src="dataInfo.imgUrl"
								lazy-load
							/>			
							</view>
							<view class="Flex pt-40 pb-24">
								<view class="">
									<uv-avatar v-if="dataInfo.avatar" :src="dataInfo.avatar" shape="circle"
									size="60rpx"></uv-avatar>
									<uv-avatar v-else src="https://via.placeholder.com/200x200.png/2878ff" shape="circle"
										size="60rpx"></uv-avatar>
								</view>
								<view class="ml-20 size-34 bold">{{ dataInfo.realname }}</view>
								<view class="ml-24">
									<uv-image v-if="dataInfo.isMember == 1" src="/static/images/vip2.png" width="44rpx" height="44rpx"
										mode="scaleToFill"></uv-image>
									<uv-image v-else src="/static/images/vip1.png" width="44rpx" height="44rpx"
										mode="scaleToFill"></uv-image>
								</view>
							</view>
							<view id="copyright_amount">
								<input 
									class="uni-input" 
									v-model="dataInfo.price" focus 
									:maxlength="10"
									type="number"
									placeholder="请填写该图版权金额"
								/>
							</view>
							<view id="info">
								<view>填写后一经发布无法再次修改</view>
								<view>修改需制除此图后重新上传</view>
							</view>
							<view class="agreement-container">
								<image
									class="check-icon"
									:src="dataInfo.isSelected ? '/static/images/selected.png' : '/static/images/notselected.png'"
									@click="toggleSelection"
								></image>
								<text class="agreement-text">用户协议：点击查看<text>《用户图像版权协议》</text></text>
							</view>
						</view>
						<view class="mt-30 Flex">
							<view
                            	class="release_btn"
								:class="{ 'disabled-btn': !dataInfo.isSelected }"
								@click="confirmRelease"
							>
								确定发布
							</view>
						</view>
					</view>
				</view>
			</view>
		</uv-popup>
	</view>
</template>

<script setup lang="ts">
	import { baseURL } from '@/utils/config.ts';
	import { reactive,ref ,onMounted} from 'vue';
	import { get, post, del } from '@/utils/request';
	import { getWindowHeight } from '@/pages/util/getHeight';
	import { onLoad, onUnload } from '@dcloudio/uni-app';
	import { addOpen, loggedIn, addOpenTab, formatNumber } from '@/pages/util/hooks';
	import useLoginStore from '@/pinia-store/userInfoStore';
	const useLogin = useLoginStore();
	const windowHeight = getWindowHeight();
	// console.log('useLoginuseLogin',useLogin);
	/** @name 数据 */
	const dataInfo = reactive({
		ishow: 'b',
		// hot1：热门  tryOut1：脉星人	 	发布脉星人：veinMan1
		flag: '',
		captcha: '',
		isCollect: false,
		imgUrl: '',
		isUseMoney: false,
		scNum: 0,
		dzNum: 0,
		kongAi: true,
		price:'',
		id: "",
		state: 0,
		fabu: true,
		shouAi: true,
		avatar: null,
		isFaBu: false,
		isLike: false,
		realname: '',
		isshouw: true,
		isSelected: false, // 是否选中协议
	});
	const popupUseRef = ref(null);
	onUnload(() => {
		const pages = getCurrentPages(); // 获取当前页面栈的实例
		const currentPage = pages[pages.length - 1]; // 获取当前页面实例
		const route = currentPage.route; // 获取当前页面的路由
		console.log('当前页面路由:', route);
		uni.setStorageSync('route', route);

	})
	const handleMouseDown = () => {
		dataInfo.isUseMoney = true;
	};
	const handleMouseUp = () => {
		dataInfo.isUseMoney = false;
	};
	const particularsFun = async (val) => {

		console.log(val)
		let id = String(val.id ? val.id : val)
		try {
			const response = await get<{
				result : any;
				id : String;
			}>('customized/getDetailsData', { id: id });
			if (response) {
				// 
				dataInfo.avatar = response.result.avatar
				dataInfo.imgUrl = response.result.synthesisImg ? response.result.synthesisImg : response.result.imgUrl
				dataInfo.dzNum = response.result.dzNum
				dataInfo.scNum = response.result.scNum
				dataInfo.id = response.result.id
				dataInfo.realname = response.result.realname
				dataInfo.state = response.result.state
				dataInfo.isFaBu = true
dataInfo.isMember = response.result.isMember
                 dataInfo.price =c
				dataInfo.characters = response.result.characters
				dataInfo.isCollect = response.result.isCollect == 1 ? true : false
				dataInfo.isLike = response.result.isLike == 1 ? true : false


				dataInfo.shouAi = dataInfo.isCollect
				dataInfo.kongAi = dataInfo.isLike

				if (dataInfo.imgUrl) {
					adjustImageSize(dataInfo.imgUrl);
				}
				// .substring(0, 30) +'...'
			}

		} catch (error) {
			console.error(error);
		}
	};
	const delFun = async (val) => {
		console.log(val)
		try {
			const response = await del<{
				ids : String;
			}>('replacement/deleteBatch?ids=' + dataInfo.id,);
			if (response) {
				if (dataInfo.isshouw == true) {

					dataInfo.isshouw = false
					uni.$emit('refreshData', { refresh: true });
					uni.showToast({
						title: '删除成功',
						icon: 'error',
						duration: 2000
					});
					setTimeout(() => {
						uni.navigateBack({
							delta: 1
						})
					}, 800)

				}


				//  uni.navigateBack({
				//    delta: 1,
				// success() {
				//         uni.$emit('update',{msg:'页面更新'})
				//     }
				//  });
				// dataInfo.imgUrl = response.result.synthesisImg ? response.result.synthesisImg : response.result.imgUrl
				// dataInfo.dzNum = response.result.dzNum
				// dataInfo.scNum = response.result.scNum
				// dataInfo.id = response.result.id
				// dataInfo.realname = response.result.realname


			}

		} catch (error) {
			console.error(error);
		}
	};
	const kongAiFun = async (val) => {
		// (0:收藏 1:喜欢 2:下载)"
		if (val == 0) {
			dataInfo.shouAi = !dataInfo.shouAi
		} else if (val == 1) {
			dataInfo.kongAi = !dataInfo.kongAi
		}

		console.log(val)
		try {
			const response = await post<{
				id : Number;
				type : String
			}>('collect/add', { imgId: dataInfo.id, type: val });
			if (response) {
				particularsFun({ id: dataInfo.id })
			}

		} catch (error) {
			console.error(error);
		}
	};
	const isFaBuFun = async (id) => {
		if(id == '0'){
			// if (dataInfo.imgUrl) {
			// 	adjustImageSize(dataInfo.imgUrl);
			// }
			popupUseRef.value?.open();
		}else{
			try {
			const response = await post<{
				id : Number;
			}>('/replacement/release', { id: dataInfo.id });
			if (response) {
				particularsFun({ id: dataInfo.id })
			}
			} catch (error) {
				console.error(error);
			}
		}
		return
		dataInfo.isFaBu = !dataInfo.isFaBu
		try {
			const response = await post<{
				id : Number;
			}>('/replacement/release', { id: dataInfo.id });
			if (response) {
				particularsFun({ id: dataInfo.id })
				// dataInfo.imgUrl = response.result.imgUrl
				// dataInfo.dzNum = response.result.dzNum
				// dataInfo.scNum = response.result.scNum
				// dataInfo.id = response.result.id

			}

		} catch (error) {
			console.error(error);
		}
	};
    // 切换选中状态
    const toggleSelection = () => {
        dataInfo.isSelected = !dataInfo.isSelected;
    };

    // 确认发布
	const confirmRelease = async (event) => {
		event.preventDefault();
		if (!dataInfo.isSelected) {
			uni.showToast({
				title: '请先同意用户协议',
				icon: 'none',
			});
			return;
		}
		if (!dataInfo.price) {
			uni.showToast({
				title: '请填写版权金额',
				icon: 'none',
			});
			return;
		}
		try {
			const response = await post<{
				id: Number;
			}>('/replacement/release', { 
				id: dataInfo.id,
				price: dataInfo.price // 添加 price 参数
			});

			if (response) {
				particularsFun({ id: dataInfo.id });
				close_release()
			}
		} catch (error) {
			console.error(error);
		}
	};

    // 关闭弹窗
    const close_release = () => {
        popupUseRef.value?.close();
    };

	const imageStyle = reactive({
		width: 'auto',
		height: 'auto',
	});
	let timer = ref(0);
	const adjustImageSize = async (imgUrl) => {
    try {
        const res = await uni.getImageInfo({
            src: imgUrl,
        });

        const maxHeight = 450; // 最大高度
        const maxWidth = 1900; // 宽度阈值
        const ratio = res.width / res.height; // 宽高比

        console.log('图片宽高:', res.width, res.height);

        if (res.width > maxWidth) {
            // 如果宽度大于 1900
            imageStyle.width = '500rpx';
            imageStyle.height = '300rpx'
        } else if (res.height > maxHeight) {
            // 如果高度超过最大值，按比例缩放
            imageStyle.height = `${maxHeight}rpx`;
            imageStyle.width = `${maxHeight * ratio}rpx`;
        } else {
            // 如果宽高都在限制范围内，使用原始宽高
            imageStyle.height = `${res.height}rpx`;
            imageStyle.width = `${res.width}rpx`;
        }
		timer.value++;
    } catch (error) {
        console.error('获取图片信息失败:', error);
    }
};
	onLoad((options : any) => {
		console.log("+++++++++++++++++++++++++++++++")
		console.log('options', options.user);
		console.log("---------------------")
		if (options?.user) {
			particularsFun(options.user)
		}

		if (options?.flag) {
			dataInfo.flag = options.flag
		}
		console.log(dataInfo,'dataInfo')
	});
	/** @name xxx */
	function getUserInfo() { }
</script>

<style scoped lang="scss">
	// :deep(.checklist-box) {
	// 	//  模版
	// }
	.UseMoney {
		color: #ffffff;
	}

	.btnUseClass {
		padding: 8rpx 10rpx;
		font-size: 24rpx;
		color: $ai-fonts;
		line-height: 1;
		border: 1px solid $ai-fonts;
		border-radius: 8rpx;
	}

	.btnUseClass2 {
		color: white;
		border: 1px solid $ai-primary;
		background-color: $ai-primary;
	}

	// 按钮
	.list_b_btn2 {
		background: #b6b6b6;
	}

	.numClass {
		font-size: 42rpx;
		font-weight: 700;
		background: -webkit-linear-gradient(#ffc800, #ff0053); // , 100%,#ff5037 left top,
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
	}
	#release_warp{
		width: 600rpx;
		position: relative;
		.release_img{
			object-fit: contain; 
			border-radius: 10rpx;
		}
		.closeClass {
			position: absolute;
			right: 24rpx;
			top: 24rpx;
		}
		#info {
			font-size: 22rpx;
			color: #999999;
			margin-top: 20rpx;
			margin-bottom: 20rpx;
		}
		#copyright_amount{
			width: 400rpx;
			margin: 10rpx auto;
			background: #F5F5F5;
			border-radius: 20rpx;
			padding: 10rpx;
			box-sizing: border-box;
			font-size: 24rpx;
		}
		.agreement-container {
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 24rpx;
			color: #999;
		}

		.check-icon {
			width: 27rpx;
			height: 27rpx;
			margin-right: 5px;
		}

		.agreement-text {
			font-size: 20rpx;
			text{
				color: #007aff;
			}
		}
		.release_btn {
			width: 100%;
			background: #007aff;
			color: #ffffff;
			text-align: center;
			padding: 20rpx 0;
			margin-top: 40rpx;
			border-radius: 8rpx;
			cursor: pointer;
		}

		/* 禁用状态按钮样式 */
		.disabled-btn {
			color: #9E9E9E;
			background: #F5F5F5;
			cursor: not-allowed;
		}
	}
</style>